import request from '@/utils/request'

export function couponTable(query) {
  return request({
    url: `${process.env.VUE_APP_MODULE_MALL_API}/api/mall/coupon/table`,
    method: 'post',
    data: query
  })
}

export function couponSelect(query) {
  return request({
    url: `${process.env.VUE_APP_MODULE_MALL_API}/api/mall/coupon/query/select`,
    method: 'post',
    data: query
  })
}

export function couponLoad(query) {
  return request({
    url: `${process.env.VUE_APP_MODULE_MALL_API}/api/mall/coupon/load`,
    method: 'get',
    params: query
  })
}

export function couponSave(query) {
  return request({
    url: `${process.env.VUE_APP_MODULE_MALL_API}/api/mall/coupon/save`,
    method: 'post',
    data: query
  })
}

export function couponDelete(query) {
  return request({
    url: `${process.env.VUE_APP_MODULE_MALL_API}/api/mall/coupon/delete`,
    method: 'post',
    data: query
  })
}
